<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class abstract_variables_map</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../program_options/reference.html#doxygen.variables__map_8hpp" title="Header &lt;boost/program_options/variables_map.hpp&gt;">
<link rel="prev" href="namespaceboost_1_1program__options_1abfbc9cfa76a640c4151a2d2a387daefc.html" title="Function bool_switch">
<link rel="next" href="classboost_1_1program__options_1_1basic__parsed__options.html" title="Class template basic_parsed_options">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="namespaceboost_1_1program__options_1abfbc9cfa76a640c4151a2d2a387daefc.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../program_options/reference.html#doxygen.variables__map_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1program__options_1_1basic__parsed__options.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class abstract_variables_map</span></h2>
<p>boost::program_options::abstract_variables_map</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../program_options/reference.html#doxygen.variables__map_8hpp" title="Header &lt;boost/program_options/variables_map.hpp&gt;">boost/program_options/variables_map.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="comment">// <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#id-1_3_29_9_11_1_1_1_2-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#doxygen.classboost_1_1program__options_1_1abstract__variables__map_1aa6633bd7f81603e8676bb21faf684842"><span class="identifier">abstract_variables_map</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#doxygen.classboost_1_1program__options_1_1abstract__variables__map_1ace92f013018a6cba24b1b21ab64434b0"><span class="identifier">abstract_variables_map</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">virtual</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#doxygen.classboost_1_1program__options_1_1abstract__variables__map_1ae53dded585691e409417127e5ad99822"><span class="special">~</span><span class="identifier">abstract_variables_map</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">const</span> <a class="link" href="classboost_1_1program__options_1_1variable__value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#doxygen.classboost_1_1program__options_1_1abstract__variables__map_1a16bd49d3dc8abdaa13dbb0c426b6edad"><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#doxygen.classboost_1_1program__options_1_1abstract__variables__map_1af39602af3ae0cb0e78e32a02b588e2a6"><span class="identifier">next</span></a><span class="special">(</span><a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#id-1_3_29_9_11_1_1_1_3-bb">private member functions</a></span>
  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1program__options_1_1variable__value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html#doxygen.classboost_1_1program__options_1_1abstract__variables__map_1aca05c7a89b280024f2df38f93bcd4b02"><span class="identifier">get</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.29.9.12.3.4"></a><h2>Description</h2>
<p>Implements string-&gt;string mapping with convenient value casting facilities. </p>
<div class="refsect2">
<a name="id-1.3.29.9.12.3.4.3"></a><h3>
<a name="id-1_3_29_9_11_1_1_1_2-bb"></a><code class="computeroutput">abstract_variables_map</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map_1aa6633bd7f81603e8676bb21faf684842"></a><span class="identifier">abstract_variables_map</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map_1ace92f013018a6cba24b1b21ab64434b0"></a><span class="identifier">abstract_variables_map</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span> next<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">virtual</span> <a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map_1ae53dded585691e409417127e5ad99822"></a><span class="special">~</span><span class="identifier">abstract_variables_map</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <a class="link" href="classboost_1_1program__options_1_1variable__value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map_1a16bd49d3dc8abdaa13dbb0c426b6edad"></a><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> name<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>if there's no value in *this.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>if there's next variable map, returns value from it</p></li>
<li class="listitem"><p>otherwise, returns empty value</p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem">
<p>if there's defaulted value</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>if there's next variable map, which has a non-defaulted value, return that</p></li>
<li class="listitem"><p>otherwise, return value from *this</p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem"><p>if there's a non-defaulted value, returns it. </p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map_1af39602af3ae0cb0e78e32a02b588e2a6"></a><span class="identifier">next</span><span class="special">(</span><a class="link" href="classboost_1_1program__options_1_1abstract__variables__map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span> next<span class="special">)</span><span class="special">;</span></pre>
<p>Sets next variable map, which will be used to find variables not found in *this. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.29.9.12.3.4.4"></a><h3>
<a name="id-1_3_29_9_11_1_1_1_3-bb"></a><code class="computeroutput">abstract_variables_map</code> private member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1program__options_1_1variable__value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a name="doxygen.classboost_1_1program__options_1_1abstract__variables__map_1aca05c7a89b280024f2df38f93bcd4b02"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> name<span class="special">)</span> <span class="keyword">const</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span></pre>
<p>Returns value of variable 'name' stored in *this, or empty value otherwise. </p>
</li></ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2002-2004 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0.
      (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 
      <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="namespaceboost_1_1program__options_1abfbc9cfa76a640c4151a2d2a387daefc.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../program_options/reference.html#doxygen.variables__map_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1program__options_1_1basic__parsed__options.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
